/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package mobileapplication2;

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.TextBox;
import javax.microedition.lcdui.TextField;
import javax.microedition.midlet.*;

/**
 * @author Aluno
 */
public class Midlet extends MIDlet {
    
    private Display tela;
    private TextBox caixa;
    private Command sair, verificar;
    
    

    public void startApp() {
        //criar a tela
        tela = Display.getDisplay(this);
        
        //criar a caixa de texto
        caixa = new TextBox("entre com um numero","",10,TextField.ANY);
        
        sair = new Command("sair", Command.SCREEN,1);
        
        verificar = new Command("verificar", Command.SCREEN, 1);
        
        //adicione os 2 comandos na caixa
        caixa.addCommand(sair);
        caixa.addCommand(verificar);
        
        //mostre na tela
        tela.setCurrent(caixa);
    }
    
    public void pauseApp() {
    }
    
    public void destroyApp(boolean unconditional) {
    }
}
